<?php

declare(strict_types=1);

namespace app\xapply\controller;

use app\xapply\middleware\Auth;
use app\xapply\Xapply;

class Get extends Xapply
{

    protected $middleware = [Auth::class];

    /**
     * 根据短ID读取小程序应用的接口地址
     * url: http://域名/xapply/get
     * doc: https://lutui.net/doc/miniprogram/request.html
     */
    public function index()
    {
        $app_name = $this->data['name']; // 应用标识
        $url = ''; // 小程序Api地址
        return json(['api' => $url]);
    }
}
